package com.byx.chatclient.manager;

import com.byx.chatclient.entity.UserGroupPo;
import com.byx.chatclient.entity.UserGroupPoDao;
import com.byx.chatclient.entity.UserPo;

import org.greenrobot.greendao.AbstractDao;

/**
 * @ClassName UserGroupManager
 * @Description todo
 * @Author Superb
 * @Date 2021/5/7
 * @Version 1.0
 */
public class UserGroupManager extends BaseBeanManager<UserGroupPo,Long> {

    public UserGroupManager(AbstractDao<UserGroupPo, Long> mDao) {
        super(mDao);
    }

    public UserGroupPo queryUserGroupPo(Integer groupId,Long userId){
        return queryBuilder().where(queryBuilder().and(UserGroupPoDao.Properties.GroupId.eq(groupId),
                UserGroupPoDao.Properties.UserId.eq(userId))).unique();
    }

}
